package cn.netjava.chapter9;

public class TreadDemos {
	public static void main(String [] args)throws Exception{
		Thread t1 =new Thread(new ThreadTest("aa"));
		Thread t2 =new Thread(new ThreadTest("bb"));
		Thread t3 =new Thread(new ThreadTest("cc"));
		Thread t4 =new Thread(new ThreadTest("dd"));
		System.out.println (t1.getPriority());
		t1.getState();
		System.out.println(t1.getState());
		
		t1.start();
		System.out.println(t1.getState());
		t1.sleep(100);
		System.out.println(t1.getState());
		t1.resume();
		System.out.println(t1.getState());
		t1.stop();
		System.out.println("abac");
		
	}

}
